package com.km.app.controller.param;

import java.io.File;

public class DownloadState implements ParamState {
    private String srcPath;

    public DownloadState(String srcPath) {
        this.srcPath = srcPath == null ? null : srcPath.trim();
    }

    @Override
    public File action(ParamContext context) {
        String[] var1 = context.getQuery().split(",");
        if (var1 == null || var1.length == 0) {
            return null;
        }
        if (this.srcPath == null || this.srcPath.length() == 0) {
            return null;
        }
        return new File(this.srcPath);
    }
}
